<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Thanh Luan
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
    <head>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <!-- -->
        <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
        <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
        <!-- -->
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.rateit.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/rateit.css">
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                initThickBox('.thickbox');
         
                $j('.st_horizontal').slideTabs();
               
                Tab4Kapi();
                searchClient();
                $j('.search_box').hide();       
                $j('.sidebar_search').live('click',function(){
                    $j('.search_box').hide();
                    if($j(this).next().hasClass('active')){

                        $j('.search_box').removeClass('active');
                    }else{

                        $j('.search_box').removeClass('active');
                        $j(this).next().addClass('active');
                        $j(this).next().show();
                    }
                });
                $j(".content_right").live("click",function(){
                    $j('.search_box').hide();
                });
                $j(".choise_groups").live("mouseover",function(){
                    pk100 = $j(this).attr("lang");
                   
                    $j.post("listGroup.jsp?pk100="+pk100,function(data){
                        if(data!=null) {
                            $j(".group_list_cus").html(data);
                                                                           
                        }
                    });  
                });
            });
        </script>
    </head>
    <style type="text/css">
        .fields_more{
            float:left;

            margin-top:44px !important;
        }
        .detail_more{
            float:left;
            margin-left:254px !important;
        }
        .buttonsearch{
            border:0;
            background:url(../images/btn_search.png) repeat-x;
            width:30px; height:30px;
            color:#ffffff;
            cursor:pointer;
            text-transform:uppercase;
        }
        .buttonsearch:hover .group{display: block !important;z-index: 999;}
        .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}
        .buttonsearch2{
            border:0;
            background:url(../images/bg_submit.gif) repeat-x;
            width:68px;

            margin:0px 0 10px 20px;
            color:#ffffff;
            font-size:12px;
            font-weight:bold;
            cursor:pointer;
            border-radius:2px;
            padding:4px 0;
            text-transform:uppercase;
        }
        input{
            float:left;
            margin-left:9px;
        }
        select{
            float:left;
            height: 21px;
            width:82px;
            margin-left:9px;
        }
    </style>

    <body>
        <a4j:form>
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <h:outputText value="<div class='permission' lang='#{loginSession.right.MNU_PAR_VIE}'></div>" escape="false"/>
            <div id="content">
                <div id="menu_top">
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span><h:outputText value="#{locale.area}"/></span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span>Outlets</span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>
                                <li><a href="#"><span>Ban Điều Hành</span></a></li>
                                <li><a href="#"><span>Nhóm IT</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div id="content_detail">
                    <div class="fast_search">
                        <h:inputText value="#{k100partnerController.keySearch}" onfocus="if(this.value=='#{k100partnerController.keySearch}')this.value='';" styleClass="text_search"/>
                        <div  style="margin-left:5px; float:left" class="buttonsearch">
                            <div class="group" style="width:150px;z-index: 999; height:152px; position:absolute; background: #2B3844; color:white !important; top:30px; display:none">
                                <h:selectOneRadio layout="pageDirection" value="#{k100partnerController.typeSearch}" styleClass="feild_sex"  style="margin-left:5px; margin-top:4px; padding:15px; width:195px; height:110px;"   >
                                    <f:selectItem itemValue="0" itemLabel="Tất cả"/>
                                    <f:selectItem itemValue="2" itemLabel="Họ tên"/>
                                    <f:selectItem itemValue="1" itemLabel="Ðiện thoại"/>                            
                                    <f:selectItem itemValue="4" itemLabel="Email"/>
                                </h:selectOneRadio>
                                <h:commandButton action="#{k100partnerController.reload}" value="Tìm kiếm" style="margin-left:15px; margin-top:2px;" styleClass="buttonsearch2">
                                </h:commandButton>
                            </div>
                        </div>                  
                    </div>
                    <!-- start sidebar sidebar_row1--->
                    <div class="sidebar_row1">
                        <div class="sidebar">
                            <%--   <h:commandLink styleClass="add_new" action="#{processBean.processAddEmployee}"><span><h:outputText value="#{locale.addEmployee}"/></span></h:commandLink> --%>

                            <h:outputLink  rendered="#{loginSession.right.PAR_LST_CRE}" value="editpartner.jsp?height=236px&width=405px" styleClass="fancybox add_new" id="fancybox">
                                <span>  <h:outputText value="#{locale.add_partner}"/> </span>
                            </h:outputLink>
                        </div>
                    </div>
                    <!-- end sidebar row1--->
                    <!-- start sidebar row2--->
                    <div class="sidebar_row2">
                        <div class="sidebar">
                            <div class="sidebar_search">
                                <span> <h:outputText value="#{locale.search}"/></span>
                            </div>
                            <div class="search_box">
                                <form action="" method="get">
                                    <h3><h:outputText value="#{locale.search}"/></h3>
                                    <div class="fields_input">
                                        <input name="" type="text"  value="<h:outputText value="#{locale.search_key}"/>..." onblur="if(this.value=='')this.value='<h:outputText value="#{locale.search_key}"/>...';" onfocus="if(this.value=='<h:outputText value="#{locale.search_key}"/>...')this.value='';" />
                                        <input name="" type="submit" value="OK" />
                                    </div>
                                </form>
                                <h4><h:outputText value="#{locale.advance_search}"/></h4>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.group}"/> / <h:outputText value="#{locale.Departments}"/></option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.sex}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.position}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.income}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_submit">
                                    <input name="" type="submit" value="<h:outputText value="#{locale.search_option}"/>" />
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- end sidebar row2--->
                    <div class="fillter">
                        <div class="dropdown">
                            <div class="select_hidden">

                                <ul>
                                    <li><a href="#"><span>Ban Điều Hành</span></a></li>
                                    <li><a href="#"><span>Nhóm IT</span></a></li>
                                    <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                </ul>
                            </div>

                        </div>
                    </div>
                    <div class="content_right">
                        <div class="content">
                            <div class="title">
                                <%--<h2><h:outputText value="#{locale.listEmployee}"/></h2>--%>

                                <div class="sort">
                                    <div class="sort_num">
                                        <a href="#"><span> <h:outputText value="#{locale.num1}"/> </span></a>
                                    </div>
                                    <div class="sort_char">

                                        <jsp:include page="../../common/search.jsp"/>

                                    </div>
                                </div>
                            </div>
                            <!-- Strart list Content -->
                            <div class="list_content">

                                <a4j:repeat value="#{k100partnerController.listK100supplierAll}" var="item" rowKeyVar="index">
                                    <div class="item">
                                        <div class="fields_id">
                                            <h:outputText value="#{index+1}">.
                                                <f:convertNumber  pattern="##000"></f:convertNumber>
                                            </h:outputText>
                                        </div>
                                        <div class="fields_avatar">
                                            <h:outputLink  value="logo.jsp?pk100=#{item.pk100}&page=logo5&type=ALL&height=165px&width=410px&KeepThis=true&amp;TB_iframe=true&amp;modal=true" styleClass="thickbox" id="logo">
                                                <h:graphicImage value="/image?id=#{item.pk100}&pk100=K100" alt=""   >

                                                </h:graphicImage>
                                            </h:outputLink>
                                        </div>
                                        <div class="fields_info">
                                            <h2><a><h:outputText value="#{item.kv103} "/></a></h2>
                                            <h3><h:outputText value="#{locale.code_num}"/>: <h:outputText value="#{item.kv105} "/></h3>
                                            <h3><h:outputText value="#{item.nv552}" style="font-size: 10px;line-height: 16px;font-weight: bold;font-style: italic;" /></h3>
                                        </div>
                                        <div class="fields_contact_emp">
                                            <h2><h:outputText value="Phone:" style="float: left;width:45px;"/>
                                                <h:outputLink value="sendSMS.jsp?action=sendSMS&hoten=#{item.kv103}&pn100=#{item.pk100}&phone=#{item.kv961}" styleClass="fancybox">
                                                    <h:outputText value="#{item.kv961}" /> 
                                                </h:outputLink>
                                                <a><img src="../images/icon1.png" alt="" /></a> <a href="#"><img src="../images/icon2.png" alt="" /></a></h2>
                                            <%--<h3><h:outputText value="#{locale.email}"/>:&nbsp;<a><h:outputText value="#{item.kv967}" /></a></h3>--%>
                                            <h3><h:outputText value="Email:" style="float: left;width:45px;"/><h:outputLink value="popupSendMailPerson.jsp?page=customer&idx=#{item.pk100}&mailx=#{item.kv967}&typex=customer&KeepThis=true&amp;TB_iframe=true&amp;height=653&amp;width=741&amp;modal=true" styleClass="thickbox add_new" id="thickbox3"  ><h:outputText value="#{item.kv967}" /></h:outputLink></h3>
                                        </div>
                                        <div class="edit_more">
                                            <div class="fields_more detail_more" lang="<h:outputText value="#{item.pk100}"/>">
<!--                                                <div class="select_group">
                                                    <div class="choise_groups" lang="<h:outputText value="#{item.pk100}"/>"></div>
                                                    <div class="choise_groups_hiden">
                                                        <div class="group_header"><h:outputText value="Nhóm"/></div>
                                                        <div class="group_list_cus">

                                                        </div>
                                                    </div>
                                                </div>-->
                                                <div class="dropdown " style="float:left;">
                                                    <div class="select_choise" style="float:left;">
                                                        <a href="#"><span style>&nbsp; &nbsp;&nbsp;&nabla;</span></a>
                                                    </div>
                                                    <div class="select_hidden">
                                                        <ul>
                                                            <h:panelGroup rendered="#{loginSession.right.PAR_CON_VIE}"> <li><a lang="tab1<h:outputText value="#{item.pk100}"/>" class="menu-context" href="#<h:outputText value="#{item.pk100}"/>"><span><h:outputText value="#{locale.contact_info}"/></span></a></li></h:panelGroup>

                                                            <h:panelGroup rendered="#{loginSession.right.PAR_DOC_VIE}">  <li><a lang="tab3<h:outputText value="#{item.pk100}"/>" class="menu-context" href="#<h:outputText value="#{item.pk100}"/>"><span><h:outputText value="#{locale.document}"/></span></a></li></h:panelGroup>

                                                            <h:panelGroup rendered="#{loginSession.right.PAR_ACC_VIE}"> <li><a lang="tab5<h:outputText value="#{item.pk100}"/>" class="menu-context" href="#<h:outputText value="#{item.pk100}"/>"><span><h:outputText value="#{locale.acount_info}"/></span></a></li></h:panelGroup>
                                                            <li><a lang="tab6<h:outputText value="#{item.pk100}"/>" class="menu-context" href="#<h:outputText value="#{item.pk100}"/>"><span><h:outputText value="Dịch vụ"/></span></a></li>
                                                            <li><a class="menu-context close" href="#"><span><h:outputText value="#{locale.close}"/></span></a></li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="fields_edit">
                                                <h:outputLink    rendered="#{loginSession.right.PAR_LST_MOD}"   value="editpartner.jsp?pnPK100=#{item.pk100}&height=236px&width=405px" styleClass="fancybox">
                                                    <img src="../images/edit.png" alt="edit" title="edit"/>
                                                </h:outputLink>
                                                <h:outputLink    rendered="#{loginSession.right.PAR_LST_DEL}"   value="delete.jsp?id=#{item.pk100}&flag=K100S&page=partner.jsp&width=300&height=150" styleClass="fancybox">
                                                    <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                </h:outputLink>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="tabs_menu">
                                        <div id="st_horizontal" class="st_horizontal">
                                            <div class="st_tabs_container st_sliding_active">
                                                <a href="#prev" class="st_prev" style="display: inline;"></a>
                                                <div class="st_slide_container">
                                                    <ul class="st_tabs" style="margin-left:0px">
                                                        <h:outputText escape="false"    rendered="#{loginSession.right.PAR_CON_VIE}"
                                                                      value='
                                                                      <li   class="st_tab  tab1#{item.pk100}"
                                                                      id="#{item.pk100}"
                                                                      lang="contactCompanyDetail.jsp">#{locale.contact_info}

                                                                      </li>
                                                                      '
                                                                      />
                                                       
                                                        <h:outputText escape="false"    rendered="#{loginSession.right.PAR_DOC_VIE}"
                                                                      value='
                                                                      <li class="st_tab tab3#{item.pk100}"
                                                                      id="#{item.pk100}"
                                                                      lang="documentdetail.jsp">#{locale.document} <a></a> </li>
                                                                      '
                                                                      />
                                                        <h:outputText escape="false"    rendered="#{loginSession.right.PAR_ACC_VIE}"
                                                                      value='
                                                                      <li class="st_tab tab5#{item.pk100}"
                                                                      id="#{item.pk100}"
                                                                      lang="accountDetail.jsp" itemid="K100" >#{locale.acount_info}<a></a> </li>
                                                                      '
                                                                      />
                                                        <h:outputText escape="false"    
                                                                      value='
                                                                      <li class="st_tab tab6#{item.pk100}"
                                                                      id="#{item.pk100}"
                                                                      lang="serviceDetail.jsp" itemid="K100" >Dịch vụ<a></a> </li>
                                                                      '
                                                                      />


                                                    </ul>
                                                </div> <!-- /.st_slide_container -->
                                                <a style="display: inline;" href="#next" class="st_next st_btn_disabled"></a>
                                            </div> <!-- /.st_tabs_container -->
                                            <div class="item_description"></div>
                                        </div>
                                    </div>

                                    <!--
                                  <div style="display:none" class="item_detail">
                                      
                                <ul class="item_tab tab1<h:outputText value='#{item.pk100}'/>" id="<h:outputText value="#{item.pk100}"/>" title="page" lang="contactInfoDetails.jsp">LIÊN HỆ</ul>
                                        <ul class="item_tab tab2<h:outputText value='#{item.pk100}'/>" id="<h:outputText value="#{item.pk100}"/>" lang="jobInfoDetails.jsp" >CÔNG VIỆC</ul>
                                        <ul class="item_tab tab3<h:outputText value='#{item.pk100}'/>" id="<h:outputText value="#{item.pk100}"/>" title="page" lang="personalInfoDetails.jsp" >CÁ NHÂN</ul>
                                        <div class="item_description">description
                                    </div> </div> -->
                                </a4j:repeat>
                                <%--<div class="fotter-page">
                                    <jsp:include page="../../common/paging.jsp"/>
                                </div>--%>
                            </div>
                            <!-- End List Content-->    
                        </div>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>
                         <h:inputHidden value="#{k100partnerController.temp}" id="temp"/>
                    </div>
                </div>
            </div>
        </a4j:form>

    </body>
</html>
